<div class="picture">
    <% unless f.object.new_record? %>
        <%= image_tag f.object.data.url %>
    <% end %>
    <%= f.file_field :data %>
	<%= error_message_on f.object, :data_size -%>
	<%= error_message_on f.object, :data_content_type%>
    <%= delete_picture(f) %>
</div>